import {DISTRIBUTORHOTELLIST,DISTRIBUTORADDHOTEL,DISTRIBUTORSETCITY,DISTRIBUTORSETONLINE,DISTRIBUTORSETOFFLINE,DISTRIBUTORCONFIGLIST,DISTRIBUTORSAVECONFIG,DISTRIBUTORSUPPLIERSETTINGLIST,DISTRIBUTORSAVESUPPLIERSETTING,DISTRIBUTORHOTELSETTINGLIST,DISTRIBUTORSAVEHOTELSETTING,DISTRIBUTORDELETEHOTELSETTING,DISTRIBUTORHOTEL,DISTRIBUTORROOMLIST,DISTRIBUTORPUSHHOTEL,DISTRIBUTORPUSHROOM,DISTRIBUTORPUSHDELETE,DISTRIBUTORQUERYPUSH} from '@/services/api'
import {request, METHOD} from '@/utils/request'

/**
 * 获取酒店列表
 */
export async function getHotelList(pageIndex, pageSize, params) {
    params.pageIndex = pageIndex
    params.pageSize = pageSize
    return request(DISTRIBUTORHOTELLIST, METHOD.POST, params)
}

/**
 * 获取酒店
 */
export async function getHotel(params) {
    return request(DISTRIBUTORHOTEL, METHOD.GET, params)
}

/**
 * 获取房型列表
 */
export async function getRoomList(params) {
    return request(DISTRIBUTORROOMLIST, METHOD.GET, params)
}

/**
 * 添加酒店
 */
export async function addHotels(params) {
    return request(DISTRIBUTORADDHOTEL, METHOD.POST, params)
}

/**
 * 设置城市
 */
export async function setCity(params) {
    return request(DISTRIBUTORSETCITY, METHOD.POST, params)
}

/**
 * 设置城市
 */
export async function setOnline(params) {
    return request(DISTRIBUTORSETONLINE, METHOD.POST, params)
}

/**
 * 设置城市
 */
export async function setOffline(params) {
    return request(DISTRIBUTORSETOFFLINE, METHOD.POST, params)
}

/**
 * 获取Config列表
 */
export async function getConfigList() {
    return request(DISTRIBUTORCONFIGLIST, METHOD.GET)
}

/**
 * 保存Config
 */
export async function saveConfig(params) {
    return request(DISTRIBUTORSAVECONFIG, METHOD.POST, params)
}

/**
 * 获取SupplierSetting列表
 */
export async function getSupplierSettingList(params) {
    return request(DISTRIBUTORSUPPLIERSETTINGLIST, METHOD.GET, params)
}

/**
 * 保存SupplierSetting
 */
export async function saveSupplierSetting(params) {
    return request(DISTRIBUTORSAVESUPPLIERSETTING, METHOD.POST, params)
}

/**
 * 获取HotelSetting列表
 */
export async function getHotelSettingList(params) {
    return request(DISTRIBUTORHOTELSETTINGLIST, METHOD.GET, params)
}

/**
 * 保存HotelSetting
 */
export async function saveHotelSetting(params) {
    return request(DISTRIBUTORSAVEHOTELSETTING, METHOD.POST, params)
}

/**
 * 删除HotelSetting
 */
export async function deleteHotelSetting(params) {
    return request(DISTRIBUTORDELETEHOTELSETTING, METHOD.GET, params)
}

/**
 * 推送酒店
 */
export async function pushHotelInfo(params) {
    return request(DISTRIBUTORPUSHHOTEL, METHOD.GET, params)
}
/**
 * 推送删除酒店
 */
export async function pushDeleteHotel(params) {
    return request(DISTRIBUTORPUSHDELETE, METHOD.GET, params)
}
/**
 * 推送房型
 */
export async function pushRoomInfo(params) {
    return request(DISTRIBUTORPUSHROOM, METHOD.GET, params)
}
/**
 * 查询推送结果
 */
export async function queryPushResult(params) {
    return request(DISTRIBUTORQUERYPUSH, METHOD.GET, params)
}